package edu.hawaii.myisern.model;

import java.util.List;

/**
 * Interface class for handling displaying data abstractly.
 * 
 * @author Andrew Wong
 *
 */
public interface DisplayableIsernData {
  /**
   * Retrieves the field names for the data that is returned.
   * 
   * @return Field names in a list.
   */
  List<String> getHeader();

  /**
   * Retrieves the data stored in the object.
   * 
   * @return A list of objects in String representation, 
   * entries corresponding to the header entries.
   */
  List<List<String>> getData();
  
  /**
   * Updates the data structure using the ordering defined in getHeader.
   * 
   * @param newEntry Array list of fields for new entry.
   * @param toAdd true if is new entry to be added, false if edit.
   * @return true if an entry was added or updated successfully, false if not.
   */
  String updateData(List<String> newEntry, boolean toAdd);
  
}
